import Vue from 'vue';
import Router from 'vue-router';

import personInfo from '@/components/mediaGL/infoLook/personInfo'
import enterpriseInfo from "@/components/mediaGL/infoLook/enterpriseInfo"
Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/accountAudit'
        },
        {
            path: '/',
            component: resolve => require(['../components/common/Home.vue'], resolve),
            meta: { title: '自述文件' },
            children:[
                {
                    path: '/dashboard',
                    component: resolve => require(['../components/page/Dashboard.vue'], resolve),
                    meta: { title: '系统首页' }
                },
                {
                    path: '/icon',
                    component: resolve => require(['../components/page/Icon.vue'], resolve),
                    meta: { title: '自定义图标' }
                },
                {
                    path: '/table',
                    component: resolve => require(['../components/page/BaseTable.vue'], resolve),
                    meta: { title: '基础表格' }
                },
                {
                    path: '/tabs',
                    component: resolve => require(['../components/page/Tabs.vue'], resolve),
                    meta: { title: 'tab选项卡' }
                },
                {
                    path: '/form',
                    component: resolve => require(['../components/page/BaseForm.vue'], resolve),
                    meta: { title: '基本表单' }
                },
                {
                    // 富文本编辑器组件
                    path: '/editor',
                    component: resolve => require(['../components/page/VueEditor.vue'], resolve),
                    meta: { title: '富文本编辑器' }
                },
                {
                    // markdown组件
                    path: '/markdown',
                    component: resolve => require(['../components/page/Markdown.vue'], resolve),
                    meta: { title: 'markdown编辑器' }    
                },
                {
                    // 图片上传组件
                    path: '/upload',
                    component: resolve => require(['../components/page/Upload.vue'], resolve),
                    meta: { title: '文件上传' }   
                },
                {
                    // vue-schart组件
                    path: '/charts',
                    component: resolve => require(['../components/page/BaseCharts.vue'], resolve),
                    meta: { title: 'schart图表' }
                },
                {
                    // 拖拽列表组件
                    path: '/drag',
                    component: resolve => require(['../components/page/DragList.vue'], resolve),
                    meta: { title: '拖拽列表' }
                },
                {
                    // 拖拽Dialog组件
                    path: '/dialog',
                    component: resolve => require(['../components/page/DragDialog.vue'], resolve),
                    meta: { title: '拖拽弹框' }
                },
                {
                    // 权限页面
                    path: '/permission',
                    component: resolve => require(['../components/page/Permission.vue'], resolve),
                    meta: { title: '权限测试', permission: true }
                },
                {
                    path: '/404',
                    component: resolve => require(['../components/page/404.vue'], resolve),
                    meta: { title: '404' }
                },
                {
                    path: '/403',
                    component: resolve => require(['../components/page/403.vue'], resolve),
                    meta: { title: '403' }
                },
                {//1. 管理员账号管理—— 新建账号
                    path: '/createAccount',
                    component:resolve => require(['../components/accountGL/createAccount.vue'], resolve),
                    meta: { title: '管理员账号添加' , permission: true}
                },
                {//1. 管理员账号管理—— 账号维护
                    path: '/manageAccount',
                    component:resolve => require(['../components/accountGL/manageAccount.vue'], resolve),
                    meta: { title: '管理员账号管理', permission: true }
                },
                {//2.媒体账号管理中
                    path: '/accountAudit',
                    component: resolve => require(['../components/mediaGL/accountAudit.vue'], resolve),
                    meta: { title: '媒体账号审核' }
                },
                    {//2.1申请审核里面的个人类型类型
                        path:'/personInfo',
                        component:personInfo,
                        name:'personInfo',
                        meta: { title: '媒体个人类型' },
                    },
                    {//2.2申请审核里面的企业类型
                        path:'/enterpriseInfo',
                        component:enterpriseInfo,
                        name:'enterpriseInfo',
                        meta: { title: '媒体企业类型' },
                    },
                {//2.媒体账号管理中
                    path: '/accountMaint',
                    component: resolve => require(['../components/mediaGL/accountMaint.vue'], resolve),
                    meta: { title: '媒体账号维护' }
                },
                    {//2.1 媒体维护里面的个人类型类型
                        path:'/personInfoLook',
                        component: resolve => require(['../components/mediaGL/look/personInfo.vue'], resolve),
                        name:'personInfoLook',
                        meta: { title: '媒体个人类型' },
                    },
                    {//2.2 媒体维护里面的企业类型
                        path:'/enterpriseInfoLook',
                        component: resolve => require(['../components/mediaGL/look/enterpriseInfo.vue'], resolve),
                        name:'enterpriseInfoLook',
                        meta: { title: '媒体企业类型' },
                    },
                {//3.广告管理中审核
                    path: '/adreviewe',
                    component: resolve => require(['../components/advertGL/reviewe.vue'], resolve),
                    meta: { title: '广告审核' }
                },
                    {//3.1广告管理中审核查看详情
                        path: '/revinfo',
                        component: resolve => require(['../components/advertGL/info/revInfo.vue'], resolve),
                        meta: { title: '广告审核-查看详情' }
                    },
                {//3.广告管理中维护
                    path: '/adMaintain',
                    component: resolve => require(['../components/advertGL/Maintain.vue'], resolve),
                    meta: { title: '广告维护' }
                },
                    {//3.1广告管理中 维护查看详情
                        path: '/MaintainInfo',
                        component: resolve => require(['../components/advertGL/info/MaintainINFO.vue'], resolve),
                        meta: { title: '广告维护-查看详情' }
                    },
                {//4.文章管理中审核
                    path: '/articleReview',
                    component: resolve => require(['../components/articleGL/ArticleReview.vue'], resolve),
                    meta: { title: '文章审核' }
                },
                    {//4.1文章管理中审核
                        path: '/examine',
                        component: resolve => require(['../components/articleGL/Info/examine.vue'], resolve),
                        meta: { title: '文章审核-查看详情' }
                    },
                {//4.文章管理中维护
                    path: '/articleMain',
                    component: resolve => require(['../components/articleGL/ArticleMain.vue'], resolve),
                    meta: { title: '文章维护' }
                },
                    {//4.1文章管理中审核
                        path: '/details',
                        component: resolve => require(['../components/articleGL/Info/details.vue'], resolve),
                        meta: { title: '文章维护-查看详情' }
                    },
                {//5.评论板块
                    path: '/comment',
                    component: resolve => require(['../components/comment/comment.vue'], resolve),
                    meta: { title: '评论板块' }
                },
                {//6.分类管理中的——分类创建
                    path: '/createClass',
                    component: resolve => require(['../components/classifiedGL/createClass.vue'], resolve),
                    meta: { title: '分类管理-分类创建' }
                },
                {//6.分类管理中的——分类创建
                    path: '/maintenanceClass',
                    component: resolve => require(['../components/classifiedGL/maintenanceClass.vue'], resolve),
                    meta: { title: '分类管理-分类维护' }
                },
                {//7.平台数据中的——文章数据
                    path: '/articleData',
                    component: resolve => require(['../components/platformData/articleData.vue'], resolve),
                    meta: { title: '平台数据-文章数据' }
                },
                    {//7.1平台数据中的——文章数据详情 走势图
                        path: '/articleTrend',
                        component: resolve => require(['../components/platformData/info/articleTrend.vue'], resolve),
                        meta: { title: '平台数据-文章数据详情' }
                    },
                {//7.平台数据中的——广告数据
                    path: '/adverData',
                    component: resolve => require(['../components/platformData/adverData.vue'], resolve),
                    meta: { title: '平台数据-广告数据' }
                },
                    {//7.1平台数据中的——广告数据详情 走势图
                        path: '/adverTrend',
                        component: resolve => require(['../components/platformData/info/adverTrend.vue'], resolve),
                        meta: { title: '平台数据-广告数据详情' }
                    },
            ]
        },
        {
            path: '/login',
            component: resolve => require(['../components/page/Login.vue'], resolve)
        },
        {
            path: '*',
            redirect: '/404'
        }
    ]
})
